<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>S110_nRF51822/Include/ble/ble_services/ble_hrs.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css" />
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="alias.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="alias.js"></script>

<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>


<script type="text/javascript">
  jQuery(document).ready(function () {
    if(gref){ // Number all _img and _table classes
      gref();
    }
  });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->

<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">nRF51822 BLE SDK
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('ble__hrs_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">S110_nRF51822/Include/ble/ble_services/ble_hrs.h File Reference</div>  </div>
</div>
<div class="contents">
<div class="textblock"><code>#include &lt;stdint.h&gt;</code><br/>
<code>#include &lt;stdbool.h&gt;</code><br/>
<code>#include &quot;ble.h&quot;</code><br/>
<code>#include &quot;<a class="el" href="ble__srv__common_8h_source.html">ble_srv_common.h</a>&quot;</code><br/>
</div>
<p><a href="ble__hrs_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__hrs__evt__t.html">ble_hrs_evt_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Heart Rate Service event.  <a href="structble__hrs__evt__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__hrs__init__t.html">ble_hrs_init_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Heart Rate Service init structure. This contains all options and data needed for initialization of the service.  <a href="structble__hrs__init__t.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structble__hrs__s.html">ble_hrs_s</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Heart Rate Service structure. This contains various status information for the service.  <a href="structble__hrs__s.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga31b5866ba8e305a1b7ca2fb60db7b326"></a><!-- doxytag: member="ble_hrs.h::BLE_HRS_BODY_SENSOR_LOCATION_OTHER" ref="ga31b5866ba8e305a1b7ca2fb60db7b326" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>BLE_HRS_BODY_SENSOR_LOCATION_OTHER</b>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5425d93ca774106500b41705e15055b4"></a><!-- doxytag: member="ble_hrs.h::BLE_HRS_BODY_SENSOR_LOCATION_CHEST" ref="ga5425d93ca774106500b41705e15055b4" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>BLE_HRS_BODY_SENSOR_LOCATION_CHEST</b>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga17a151b89da0050f4777588290c4aedb"></a><!-- doxytag: member="ble_hrs.h::BLE_HRS_BODY_SENSOR_LOCATION_WRIST" ref="ga17a151b89da0050f4777588290c4aedb" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>BLE_HRS_BODY_SENSOR_LOCATION_WRIST</b>&#160;&#160;&#160;2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga3cc553f76ed3ea59fabb38c628562b0d"></a><!-- doxytag: member="ble_hrs.h::BLE_HRS_BODY_SENSOR_LOCATION_FINGER" ref="ga3cc553f76ed3ea59fabb38c628562b0d" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>BLE_HRS_BODY_SENSOR_LOCATION_FINGER</b>&#160;&#160;&#160;3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gafd74436f71c3e8398e86837787e3c2a5"></a><!-- doxytag: member="ble_hrs.h::BLE_HRS_BODY_SENSOR_LOCATION_HAND" ref="gafd74436f71c3e8398e86837787e3c2a5" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>BLE_HRS_BODY_SENSOR_LOCATION_HAND</b>&#160;&#160;&#160;4</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga950b269e5a74ec5b830e99f7b7919e52"></a><!-- doxytag: member="ble_hrs.h::BLE_HRS_BODY_SENSOR_LOCATION_EAR_LOBE" ref="ga950b269e5a74ec5b830e99f7b7919e52" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>BLE_HRS_BODY_SENSOR_LOCATION_EAR_LOBE</b>&#160;&#160;&#160;5</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga63bef70c28133016a9735ffdbc732df9"></a><!-- doxytag: member="ble_hrs.h::BLE_HRS_BODY_SENSOR_LOCATION_FOOT" ref="ga63bef70c28133016a9735ffdbc732df9" args="" -->
#define&#160;</td><td class="memItemRight" valign="bottom"><b>BLE_HRS_BODY_SENSOR_LOCATION_FOOT</b>&#160;&#160;&#160;6</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hrs.html#ga2e829f32fd9d57d18d1e8daa7956dee5">BLE_HRS_MAX_BUFFERED_RR_INTERVALS</a>&#160;&#160;&#160;20</td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gafea0cb34e3a05260b4de67d81f2f4cab"></a><!-- doxytag: member="ble_hrs.h::ble_hrs_t" ref="gafea0cb34e3a05260b4de67d81f2f4cab" args="" -->
typedef struct <a class="el" href="structble__hrs__s.html">ble_hrs_s</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hrs.html#gafea0cb34e3a05260b4de67d81f2f4cab">ble_hrs_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Heart Rate Service structure. This contains various status information for the service. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga85836949ab0f55e7ffcaec72dd0ee6e1"></a><!-- doxytag: member="ble_hrs.h::ble_hrs_evt_handler_t" ref="ga85836949ab0f55e7ffcaec72dd0ee6e1" args=")(ble_hrs_t *p_hrs, ble_hrs_evt_t *p_evt)" -->
typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hrs.html#ga85836949ab0f55e7ffcaec72dd0ee6e1">ble_hrs_evt_handler_t</a> )(<a class="el" href="group__ble__sdk__srv__hrs.html#gafea0cb34e3a05260b4de67d81f2f4cab">ble_hrs_t</a> *p_hrs, <a class="el" href="structble__hrs__evt__t.html">ble_hrs_evt_t</a> *p_evt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Heart Rate Service event handler type. <br/></td></tr>
<tr><td colspan="2"><h2><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hrs.html#gaee495052c855cd5345f7301b594763c9">ble_hrs_evt_type_t</a> { <a class="el" href="group__ble__sdk__srv__hrs.html#ggaee495052c855cd5345f7301b594763c9a0f13cf6877038b174544d95ee3a40894">BLE_HRS_EVT_NOTIFICATION_ENABLED</a>, 
<a class="el" href="group__ble__sdk__srv__hrs.html#ggaee495052c855cd5345f7301b594763c9a1ed0b327eecae450aa039af15ddae345">BLE_HRS_EVT_NOTIFICATION_DISABLED</a>
 }</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Heart Rate Service event type.  <a href="group__ble__sdk__srv__hrs.html#gaee495052c855cd5345f7301b594763c9">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hrs.html#ga94256c7eb29129ff352ca53adf1ad5b8">ble_hrs_init</a> (<a class="el" href="group__ble__sdk__srv__hrs.html#gafea0cb34e3a05260b4de67d81f2f4cab">ble_hrs_t</a> *p_hrs, const <a class="el" href="structble__hrs__init__t.html">ble_hrs_init_t</a> *p_hrs_init)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the Heart Rate Service.  <a href="group__ble__sdk__srv__hrs.html#ga94256c7eb29129ff352ca53adf1ad5b8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hrs.html#gac50e029608199cc8d52463acb3e8a02e">ble_hrs_on_ble_evt</a> (<a class="el" href="group__ble__sdk__srv__hrs.html#gafea0cb34e3a05260b4de67d81f2f4cab">ble_hrs_t</a> *p_hrs, <a class="el" href="structble__evt__t.html">ble_evt_t</a> *p_ble_evt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Heart Rate Service BLE stack event handler.  <a href="group__ble__sdk__srv__hrs.html#gac50e029608199cc8d52463acb3e8a02e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hrs.html#gabe5fed48baeb4a518a51bd7e2e5f010e">ble_hrs_heart_rate_measurement_send</a> (<a class="el" href="group__ble__sdk__srv__hrs.html#gafea0cb34e3a05260b4de67d81f2f4cab">ble_hrs_t</a> *p_hrs, uint16_t heart_rate)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sends heart rate measurement if notification has been enabled.  <a href="group__ble__sdk__srv__hrs.html#gabe5fed48baeb4a518a51bd7e2e5f010e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hrs.html#gaea316a9c9503571b143d93086295f61a">ble_hrs_rr_interval_add</a> (<a class="el" href="group__ble__sdk__srv__hrs.html#gafea0cb34e3a05260b4de67d81f2f4cab">ble_hrs_t</a> *p_hrs, uint16_t rr_interval)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a RR Interval measurement to the RR Interval buffer.  <a href="group__ble__sdk__srv__hrs.html#gaea316a9c9503571b143d93086295f61a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hrs.html#gaf207a34d16fbee25b5555fd4192b5b15">ble_hrs_rr_interval_buffer_is_full</a> (<a class="el" href="group__ble__sdk__srv__hrs.html#gafea0cb34e3a05260b4de67d81f2f4cab">ble_hrs_t</a> *p_hrs)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Checks if RR Interval buffer is full.  <a href="group__ble__sdk__srv__hrs.html#gaf207a34d16fbee25b5555fd4192b5b15"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hrs.html#gad8b66aa54ddf79459271df6ec9b65644">ble_hrs_sensor_contact_supported_set</a> (<a class="el" href="group__ble__sdk__srv__hrs.html#gafea0cb34e3a05260b4de67d81f2f4cab">ble_hrs_t</a> *p_hrs, bool is_sensor_contact_supported)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the state of the Sensor Contact Supported bit.  <a href="group__ble__sdk__srv__hrs.html#gad8b66aa54ddf79459271df6ec9b65644"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hrs.html#ga4eccea2cb1d248ccdc75bebb84c1dff2">ble_hrs_sensor_contact_detected_update</a> (<a class="el" href="group__ble__sdk__srv__hrs.html#gafea0cb34e3a05260b4de67d81f2f4cab">ble_hrs_t</a> *p_hrs, bool is_sensor_contact_detected)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the state of the Sensor Contact Detected bit.  <a href="group__ble__sdk__srv__hrs.html#ga4eccea2cb1d248ccdc75bebb84c1dff2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__srv__hrs.html#gab3ec66c7419f5c79ad54f849353e8aea">ble_hrs_body_sensor_location_set</a> (<a class="el" href="group__ble__sdk__srv__hrs.html#gafea0cb34e3a05260b4de67d81f2f4cab">ble_hrs_t</a> *p_hrs, uint8_t body_sensor_location)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the Body Sensor Location.  <a href="group__ble__sdk__srv__hrs.html#gab3ec66c7419f5c79ad54f849353e8aea"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock">
<p>Definition in file <a class="el" href="ble__hrs_8h_source.html">ble_hrs.h</a>.</p>
</div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="ble__hrs_8h.html">ble_hrs.h</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">
      Copyright &copy 2006-2011 <a href="http://www.nordicsemi.no" style="text-decoration:none">Nordic Semiconductor</a>.
      All Rights Reserved.
      <a href="disclaimer.html">Disclaimer</a>
    </li>
   </ul>
 </div>


</body>
</html>
